function [ output_args ] = eval_grade( input_args )
prof={'1;'};
mat={'1;','2;','3;'};
% s1, t1, q1, q1, s1, s1, s2, t2, q2, q2, s2, s2
pref=[2,0,2,0,1,0,2,0,2,0,1,0];
%  m1 m2 m3 m4 m5 m6 m7  m8
prmt=[ 2, 0, 0, 0, 0, 0, 0, 0;  %prof1
   0, 2, 0, 0, 0, 0, 0, 0;  %prof2
   0, 0, 2, 0, 0, 0, 0, 0;  %prof3
   0, 0, 0, 2, 0, 0, 0, 0;  %prof4
   0, 0, 0, 0, 2, 0, 0, 0;  %prof5
   0, 0, 0, 0, 0, 2, 0, 2;  %prof6
   0, 0, 0, 0, 0, 0, 2, 0]; %prof7
%     m1 m2  m3  m4  m5  m6  m7  m8
matt=[ 1, 2, 2, 1, 2, 1, 2, 1];  %prof1
%até isso 
B = bits2bytes(input_args);
err = [];
merr = [];
perr = [];
terr = [];
Bp=B(1:12);
gradep=mod(Bp, size(prof,2))+1;
err(1)=sum (not(diag(pref(gradep,:))));
Bm=B(13:24);
gradem=mod(Bm,size(mat,2))+1;
merr(1)=prmt(gradep(1),gradem(1))*10000;
merr(2)=prmt(gradep(2),gradem(2))*10000;
merr(3)=prmt(gradep(3),gradem(3))*10000;
merr(4)=prmt(gradep(4),gradem(4))*10000;
merr(5)=prmt(gradep(5),gradem(5))*10000;
merr(6)=prmt(gradep(6),gradem(6))*10000;
merr(7)=prmt(gradep(7),gradem(7))*10000;
merr(8)=prmt(gradep(8),gradem(8))*10000;
merr(9)=prmt(gradep(9),gradem(9))*10000;
merr(10)=prmt(gradep(10),gradem(10))*10000;
merr(11)=prmt(gradep(11),gradem(11))*10000;
merr(12)=prmt(gradep(11),gradem(12))*10000;
perr(1)=sum(gradep(find(gradem==1))-gradep(find(gradem==1,1)))+1;
perr(2)=sum(gradep(find(gradem==2))-gradep(find(gradem==2,1)))+1;
perr(3)=sum(gradep(find(gradem==3))-gradep(find(gradem==3,1)))+1;
perr(4)=sum(gradep(find(gradem==4))-gradep(find(gradem==4,1)))+1;
perr(5)=sum(gradep(find(gradem==5))-gradep(find(gradem==5,1)))+1;
perr(6)=sum(gradep(find(gradem==6))-gradep(find(gradem==6,1)))+1;
perr(7)=sum(gradep(find(gradem==7))-gradep(find(gradem==7,1)))+1;
perr(8)=sum(gradep(find(gradem==8))-gradep(find(gradem==8,1)))+1;
perr(9)=sum(gradep(find(gradem==9))-gradep(find(gradem==9,1)))+1;
perr(11)=sum(gradep(find(gradem==11))-gradep(find(gradem==11,1)))+1;
perr(12)=sum(gradep(find(gradem==11))-gradep(find(gradem==12,1)))+1;
terr(1)=histc(gradem,gradem(1))-matt(gradem(1));
terr(2)=histc(gradem,gradem(2))-matt(gradem(2));
terr(3)=histc(gradem,gradem(3))-matt(gradem(3));
terr(4)=histc(gradem,gradem(4))-matt(gradem(4));
terr(5)=histc(gradem,gradem(5))-matt(gradem(5));
terr(6)=histc(gradem,gradem(6))-matt(gradem(6));
terr(7)=histc(gradem,gradem(7))-matt(gradem(7));
terr(8)=histc(gradem,gradem(8))-matt(gradem(8));
terr(9)=histc(gradem,gradem(9))-matt(gradem(9));
terr(10)=histc(gradem,gradem(10))-matt(gradem(10));
terr(11)=histc(gradem,gradem(11))-matt(gradem(11));
terr(12)=histc(gradem,gradem(12))-matt(gradem(12));
output_args =err+merr+perr+terr;
end
